<?php
/* 
* @Title:  [商品类型和类型属性的视图模型]
* @Author: {chenlei} [chenleib5@126.com]
* @Date:   2014-04-05 14:44:43
* @Last Modified by:   Administrator
* @Last Modified time: 2014-04-07 16:41:37
* @Copyright:  [hn7m.com]
*/
class TypeViewModel extends ViewModel{
	public $table='type'; //定义主表

	public $view=array(
		'type_attr' =>array(
					'type'	=>INNER_JOIN,
					'on'	=>'type.tid=type_attr.qm_type_tid '	
			)
	); //定义从表

	public function get_data($where=NULL,$field=NULL,$group=NULL){
		return $this->where($where)->field($field)->group($group)->findAll();
	}
}
?>